ARG PHP_VERSION=8.1.21
FROM php:${PHP_VERSION}-fpm
ENV DEBIAN_FRONTEND noninteractive
ENV TZ='Asia/Shanghai'
RUN cat /etc/os-release
RUN apt-get install -y ca-certificates
COPY sources.list /etc/apt/sources.list
RUN apt-get update && apt-get install -y apt-utils
#网络命令
RUN apt-get install iputils-ping -y && apt-get install -y net-tools
#gd库
RUN apt-get install -y \
        libfreetype6-dev \
        libjpeg62-turbo-dev \
        libpng-dev \
        libwebp-dev \
        libzstd-dev \
    && docker-php-ext-configure gd --with-webp=/usr/include/webp --with-jpeg=/usr/include --with-freetype=/usr/include/freetype2/ \
    && docker-php-ext-install -j$(nproc) gd
RUN pear update-channels
#redis扩展
RUN pecl install redis
RUN docker-php-ext-enable redis
#igbinary扩展
RUN pecl install igbinary && docker-php-ext-enable igbinary
#pdo_mysql扩展
RUN docker-php-ext-install pdo pdo_mysql
#sockets扩展
RUN docker-php-ext-install sockets
#pdo_mysql扩展
RUN docker-php-ext-install bcmath
#pcntl扩展
RUN docker-php-ext-install pcntl
#zip扩展
RUN apt-get install -y libzip-dev && docker-php-ext-install zip
#procps
RUN apt-get install -y procps
#计划任务
#RUN apt install -y cron
#重启
RUN kill -USR2 1
